package org.mendoza.salud.hvt.client.local.gui.user;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.PasswordTextBox;
import com.google.gwt.user.client.ui.TextBox;
import org.jboss.errai.ui.nav.client.local.Page;
import org.jboss.errai.ui.shared.api.annotations.DataField;
import org.jboss.errai.ui.shared.api.annotations.EventHandler;
import org.jboss.errai.ui.shared.api.annotations.Templated;

import javax.inject.Inject;

@Templated("#root")
@Page
public class UserEdit extends Composite {
    @Inject
    @DataField("username")
    TextBox username;

    @Inject
    @DataField("clave1")
    PasswordTextBox clave1;

    @Inject
    @DataField("clave2")
    PasswordTextBox clave2;

    @Inject
    @DataField("login")
    Button login;

    @EventHandler("login")
    public void clik(ClickEvent event) {
        Window.alert("Me clickearon!!!");
    }
}
